<?php
require ("D:/zhuaqu/include.php");
$url="http%3A%2F%2Fstatic3.photo.sina.com.cn%2Forignal%2F5d2b3b2dtvb1cjvo1dkgi%26690";
$url=preg_replace("/\s*http\:\/\/.*http\:\/\//isx","http://",urldecode($url));
preg_match("/http\:\/\/(.*)\//Uisx",$url,$nn);$host=$nn[1];
$url=str_replace("BAIFENHAO","%",$url);

$haveReferer=1;
if(preg_match("/sinaimg\.cn/Uisx",$url)){
  $haveReferer=0;
}

if(preg_match("/39\.com/Uisx",$url)){
  $cookie="_wt_session_refer_cookie=http%253A%252F%252Fwww.39.net%252F; Hm_lpvt_ab2e5965345c61109c5e97c34de8026a=1350459594308; Hm_lpvt_1827105cf5cfac624c8dbf5159abfdb4=1350459576311; onlineId=4770284101207144433; area_info=CN450100|%D6%D0%B9%FA|%B9%E3%CE%F7|%C4%CF%C4%FE%CA%D0|%B5%E7%D0%C5; Hm_lvt_ab2e5965345c61109c5e97c34de8026a=1350459575708; Hm_lvt_1827105cf5cfac624c8dbf5159abfdb4=1350459576311";
}



preg_match_all("/http\:\/\/([^\/]*)(\/[^<>\"\s]*)$/Uisx",$_GET[url],$nn);
$post=<<<TEXT
GET {$url} HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/QVOD, application/QVOD, */*
Accept-Language: zh-CN
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; Foxy/1; QQDownload 702; GTB7.2; Foxy/1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C)
Referer: http://{$host}
Accept-Encoding: gzip, deflate
Host: {$host}
Connection: Keep-Alive


TEXT;
$nr=preg_replace("/^.*(\r\n\r\n|\n\n)/Uis","",curl3($url,$cookie,$haveReferer));
echo $nr;



?>